T(n) = 2T(n/2) + n
T(1) = 1

=> T(n) is O(n log2(n))

- Towers of Hanoi

ToH(n, start, end, temp):
	if n == 0: return
	ToH(n - 1, start, temp, end)
	moveOneDisk(start, end)
	ToH(n - 1, temp, end, start)

T(n) is the running time when there are n disks

T(n) = 2 T(n-1) + 1
T(1) = 1

=> T(n) is O(2^n)

1^k + 2^k + ... + n^k <= n^k + n^k + ... + n^k = n*n^k = n^{k+1} is O(n^{k+1})

Case study:
Merge sort ---> AlgoExpert
Time complexity: O(n log2(n))
Space complexity: O(n)

T(n) = 2 T(n/2) + n
T(1) = 1

=> T(n) is O(n log2(n))

- Google Deep mind documentary about AlphaGo

- Stack:
This is a Last In First Out data structure 

The accessible is called the top of the stack

Simple use case: reverse the elements of an entity (String, array)

Example#2: Secret Message App

Java offers a built-in Stack class

Case study: grouping symbol matching

()--> valid

(] ---> Not valid
([)] ---> Not valid
([]) ---> Valid


([)]

Stack:
[
(

2 objectives in mind:
1. Show you how to build a stack from scratch
2. How to use the stack to solve the grouping symbols matching?

To be continued...













































